#pragma once

#include <qstring.h>
#include <qmap.h>

class VTranslation
{
public:
    explicit VTranslation(QString text, QMap<QString, QString> *map);
	~VTranslation();
	static QMap<QString, QString> *_map;
	static QMap<QString, QString> *_ch_en_map;
	static QString word_to_englisth(QString word);
	bool save_to_path(QString file_name, QString path, QString source_path);

private:
	int _pos = 0;
	int _document_length = 0;
	QString _document;

	static bool is_chinese(QString word);
	static bool is_legal_char(QChar c);
	static QString to_englisth(QString word);
	QString next_block_str();
};

